#ifndef autoinit_h
#define autoinit_h

#define ARM_MIPS_Platform

  //该宏与编译器特性相关，实测ARM、MIPS编译器下OK，其他编译器下未知。
  #ifdef ARM_MIPS_Platform 

     typedef void (*mydev_call)(void);

     extern mydev_call _dev_start;
     extern mydev_call _dev_end;

     //#define _init  __attribute__((section(".dev_init")))
     #define _init  __attribute__((unused, section(".dev_init")))

     #define auto_dev_init(func) mydev_call _fn_##func _init = func

     void sys_devices_init(void);

  #endif


#endif


